<div class="tpl-portlet-components" xmlns:th="http://www.thymeleaf.org">
    <div class="portlet-title">
        <div class="caption font-green bold">
            管理员列表
        </div>
        <div class="tpl-portlet-input tpl-fz-ml">
            <div class="portlet-input input-small input-inline">
                <div class="input-icon right">
                    <i class="am-icon-search"></i>
                    <input type="text" class="form-control form-control-solid" placeholder="搜索..."></div>
            </div>
        </div>


    </div>
    <div class="tpl-block">
        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-6">
                <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                        <button type="button" class="am-btn am-btn-default am-btn-success"
                                onclick="loadMainBody('/admin/edit/form/0')"><span
                                class="am-icon-plus"></span> 新增
                        </button>
                        <button type="button" class="am-btn am-btn-default am-btn-secondary"><span
                                class="am-icon-save"></span> 保存
                        </button>
                        <button type="button" class="am-btn am-btn-default am-btn-warning"><span
                                class="am-icon-archive"></span> 审核
                        </button>
                        <button type="button" class="am-btn am-btn-default am-btn-danger"
                                onclick="deleteAllObj('delete/all','list','chk_admin')"><span
                                class="am-icon-trash-o"></span> 删除
                        </button>
                    </div>
                </div>
            </div>

            <div class="am-u-sm-12 am-u-md-3">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field">
                    <span class="am-input-group-btn">
            <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search"
                    type="button"></button>
          </span>
                </div>
            </div>
        </div>
        <div class="am-g">
            <div class="am-u-sm-12">
                <form class="am-form">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-check"><input type="checkbox" id="chkAll_admin"
                                                           onchange="setCheckBox('chkAll_admin','chk_admin')"
                                                           class="tpl-table-fz-check"></th>
                            <th class="table-id">序号</th>
                            <th class="table-title">昵称</th>
                            <th class="table-type">帐号</th>
                            <th class="table-title">角色</th>
                            <th class="table-title">性别</th>
                            <th class="table-date am-hide-sm-only">创建日期</th>
                            <th class="table-set">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="admin : ${adminList}">
                            <td><input type="checkbox" class="chk_admin" th:attr="objId = ${admin.id}"></td>
                            <td th:text="${adminStat.index}+1">1</td>
                            <td><a   th:onclick="'loadMainBody(\'edit/form/'+${admin.id}+'\')'"  th:text="${admin.getNickname()}">Business management</a></td>
                            <td th:text="${admin.account}">account</td>
                            <td th:text="${admin.role.name}">role</td>
                            <td th:text="${admin.gender}">gender</td>
                            <td th:text="${#dates.format(admin.birthday,'yyyy-MM-dd')}" class="am-hide-sm-only">
                                birthday
                            </td>
                            <td th:text="${admin.createDate}" class="am-hide-sm-only">createDate</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <button type="button" class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                                th:onclick="'loadMainBody(\'edit/form/'+${admin.id}+'\')'" >
                                            <span class="am-icon-pencil-square-o"></span> 编辑
                                        </button>
                                        <button type="button"
                                                th:onclick="'deleteObj(\'delete/'+${admin.id}+'\',\'list\')'"
                                                class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">
                                            <span class="am-icon-trash-o"></span> 删除
                                        </button>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="am-cf">
                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                                <li><a th:onclick="'loadMainBody(\'/admin/list?page=0\')'">«</a></li>
                                <!--<li class="am-active"><a href="#">1</a></li>-->
                                <li th:each="i : ${#numbers.sequence(1,totalPage,1)}"
                                    th:id="'page'+${i}">
                                    <a th:text="${i}"
                                       th:onclick="'loadMainBody(\'/admin/list?page='+${i-1}+'\')'">1</a>
                                </li>
                                <li>
                                    <a th:onclick="'loadMainBody(\'/admin/list?page='+${totalPage-1}+'\')'">»</a>
                                </li>
                            </ul>
                            <script th:inline="javascript" type="text/javascript">
                                var id = [[${currentPage+1}]];
                                $("#page" + id).attr("class", "am-active");
                            </script>
                        </div>
                    </div>
                    <hr>

                </form>
            </div>

        </div>
    </div>
    <div class="tpl-alert"></div>
</div>

</html>